package com.google.gwt.sample.dynatablerf.client.user.events;

import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.sample.dynatablerf.shared.CategoriaProxy;
import com.google.gwt.user.client.ui.HasWidgets;

public class GoToProdutoListViewEvent extends
		GwtEvent<GoToProdutoListViewEventHandler> {

	public static Type<GoToProdutoListViewEventHandler> TYPE = new Type<GoToProdutoListViewEventHandler>();

	private CategoriaProxy categoriaProxy;
	private HasWidgets hasWidgets;

	public GoToProdutoListViewEvent(HasWidgets hasWidgets,
			CategoriaProxy categoriaProxy) {
		super();
		this.categoriaProxy = categoriaProxy;
		this.hasWidgets = hasWidgets;
	}

	@Override
	protected void dispatch(GoToProdutoListViewEventHandler handler) {

		handler.onGoToProdutoListView(this);
	}

	@Override
	public Type<GoToProdutoListViewEventHandler> getAssociatedType() {

		return TYPE;
	}

	public CategoriaProxy getCategoriaProxy() {
		return categoriaProxy;
	}

	public void setProdutoListProxy(CategoriaProxy categoriaProxy) {
		this.categoriaProxy = categoriaProxy;
	}

	public HasWidgets getHasWidgets() {
		return hasWidgets;
	}

	public void setHasWidgets(HasWidgets hasWidgets) {
		this.hasWidgets = hasWidgets;
	}

}
